package com.monkey.core.plugin.web.validator;


import org.hibernate.validator.constraints.*;

import javax.validation.constraints.*;
import java.lang.annotation.*;

/**
 * Project  : monkey
 * Author   : Wu Tian Qiang
 * Date     : 2016/10/8
 */
@Target({ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface ParameterConstraint {

    String name();

    ConstraintType[] constraintType();

    AssertFalse assertFalse() default @AssertFalse;

    AssertTrue assertTrue() default @AssertTrue;

    DecimalMax decimalMax() default @DecimalMax(value = "0");

    DecimalMin decimalMin() default @DecimalMin(value = "0");

    Digits digits() default @Digits(integer = 30, fraction = 10);

    Future future() default @Future;

    Max max() default @Max(value = Integer.MAX_VALUE);

    Min min() default @Min(value = Integer.MIN_VALUE);

    NotNull notNull() default @NotNull;

    Null null_() default @Null;

    Past past() default @Past;

    Pattern pattern() default @Pattern(regexp = "");

    Email email() default @Email;

    Length length() default @Length;

    NotBlank notBlank() default @NotBlank;

    Range range() default @Range;

}
